﻿using System;
using System.Runtime.Serialization;

namespace K9Nano.Share.Exceptions
{
    [Serializable]
    public class K9UserFriendlyException : Exception
    {
        public int Code { get; set; }
        
        public K9UserFriendlyException()
        {
        }

        public K9UserFriendlyException(string message) : base(message)
        {
            Code = 400;
        }

        public K9UserFriendlyException(int code, string message) : base(message)
        {
            Code = code;
        }

        public K9UserFriendlyException(int code, string message, Exception inner) : base(message, inner)
        {
            Code = code;
        }

        protected K9UserFriendlyException(
            SerializationInfo info,
            StreamingContext context) : base(info, context)
        {
        }
    }
}